package com.warmheart.builder.platform;

import com.warmheart.core.rs.base.BaseRsBuilder;
import com.warmheart.core.rs.oper.Rs;
import com.warmheart.entity.platform.PlatformAccount;

/**
 * 
 * @ClassName: PlatformAccount
 * @Description: 账号实体RsBuilder类，对应表名称为tb_platform_account
 *               温馨提示：不要修改该实体RsBuilder类的任何字段
 * @author ZhangJianyang
 * @date 2025年06月16日 下午13:05:35
 *
 */
public class PlatformAccountRsBuilder extends BaseRsBuilder<PlatformAccount, PlatformAccountRsBuilder> {

    private final PlatformAccount t;

    @Override
    protected PlatformAccountRsBuilder self() {
        return this;
    }

    @Override
    public PlatformAccount core() {
        return this.t;
    }

    public PlatformAccountRsBuilder(PlatformAccount platformAccount) {
        t = platformAccount;
    }

    /**
     * 所属平台ID
     */
    private Rs<PlatformAccount, PlatformAccountRsBuilder> platformId;

    /**
     * 绑定的具体资源
     */
    private Rs<PlatformAccount, PlatformAccountRsBuilder> resourceId;

    /**
     * 账号类型
     */
    private Rs<PlatformAccount, PlatformAccountRsBuilder> accountType;

    /**
     * 用户名
     */
    private Rs<PlatformAccount, PlatformAccountRsBuilder> username;

    /**
     * 加密后的凭据
     */
    private Rs<PlatformAccount, PlatformAccountRsBuilder> encryptedCredential;

    /**
     * 加密向量
     */
    private Rs<PlatformAccount, PlatformAccountRsBuilder> encryptionIv;

    /**
     * 账号描述
     */
    private Rs<PlatformAccount, PlatformAccountRsBuilder> description;

    /**
     * 是否激活
     */
    private Rs<PlatformAccount, PlatformAccountRsBuilder> state;

    /**
     * 过期时间
     */
    private Rs<PlatformAccount, PlatformAccountRsBuilder> expiresTime;

    public Rs<PlatformAccount, PlatformAccountRsBuilder> platformId() {
        if (this.platformId == null) {
            this.platformId = new Rs<PlatformAccount, PlatformAccountRsBuilder>(self(), "platform_id", "platformId");
        }
        return this.platformId;
    }

    public Rs<PlatformAccount, PlatformAccountRsBuilder> resourceId() {
        if (this.resourceId == null) {
            this.resourceId = new Rs<PlatformAccount, PlatformAccountRsBuilder>(self(), "resource_id", "resourceId");
        }
        return this.resourceId;
    }

    public Rs<PlatformAccount, PlatformAccountRsBuilder> accountType() {
        if (this.accountType == null) {
            this.accountType = new Rs<PlatformAccount, PlatformAccountRsBuilder>(self(), "account_type", "accountType");
        }
        return this.accountType;
    }

    public Rs<PlatformAccount, PlatformAccountRsBuilder> username() {
        if (this.username == null) {
            this.username = new Rs<PlatformAccount, PlatformAccountRsBuilder>(self(), "username", "username");
        }
        return this.username;
    }

    public Rs<PlatformAccount, PlatformAccountRsBuilder> encryptedCredential() {
        if (this.encryptedCredential == null) {
            this.encryptedCredential = new Rs<PlatformAccount, PlatformAccountRsBuilder>(self(), "encrypted_credential", "encryptedCredential");
        }
        return this.encryptedCredential;
    }

    public Rs<PlatformAccount, PlatformAccountRsBuilder> encryptionIv() {
        if (this.encryptionIv == null) {
            this.encryptionIv = new Rs<PlatformAccount, PlatformAccountRsBuilder>(self(), "encryption_iv", "encryptionIv");
        }
        return this.encryptionIv;
    }

    public Rs<PlatformAccount, PlatformAccountRsBuilder> description() {
        if (this.description == null) {
            this.description = new Rs<PlatformAccount, PlatformAccountRsBuilder>(self(), "description", "description");
        }
        return this.description;
    }

    public Rs<PlatformAccount, PlatformAccountRsBuilder> state() {
        if (this.state == null) {
            this.state = new Rs<PlatformAccount, PlatformAccountRsBuilder>(self(), "state", "state");
        }
        return this.state;
    }

    public Rs<PlatformAccount, PlatformAccountRsBuilder> expiresTime() {
        if (this.expiresTime == null) {
            this.expiresTime = new Rs<PlatformAccount, PlatformAccountRsBuilder>(self(), "expires_time", "expiresTime");
        }
        return this.expiresTime;
    }
}